//
//  OwnerViewController.m
//  OrderSys
//
//  Created by JM on 15-9-28.
//  Copyright (c) 2015年 zjlskj. All rights reserved.
//

#import "OwnerViewController.h"

@interface OwnerViewController ()
@property(nonatomic, strong) NSArray *menuArray;
@end

@implementation OwnerViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.menuArray = @[@"我的信息",@"我的订单",@"密码修改",@"软件说明",@"检查更新",@"意见反馈"];
    //头像设置
    self.headImageView.image = [UIImage imageNamed:@"myheadimage.jpeg"];
    //背景设置
    self.imageBG.image = [UIImage imageNamed:@"BG.jpg"];
    //昵称设置
    self.nameLabel.text = @"BISON";
    
    
    //navi导航栏 设置
    self.rightBtn.hidden = YES;
    self.leftBtn.hidden = YES;
    self.titleLabel.text = @"我的信息";
    self.titleLabel.alpha =1;
}

//右边按钮
- (void)rightBtnAction{
    NSLog(@"hello-rig");
}
//左边按钮
- (void)leftBtnAction{
    NSLog(@"hello-left");
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark-datasource

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableViewz{
    return 1;
}
- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return self.menuArray.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    NSString *ID = @"ddddd";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (!cell){
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }
    //赋值
    cell.textLabel.text = self.menuArray[indexPath.row];
   // cell.textLabel.text = @"密码修改";
    return cell;
}

#pragma mark-delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
   // NSInteger row = indexPath.row;
    
    UIViewController * viewCtrl = [[UIViewController alloc] init];
    [self.navigationController pushViewController:viewCtrl animated:YES];
    
}


@end
